package com.qc.bug.Util;

import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;



public class MD5 {
	
	
	public static String getMd5(String str){
		
		try {
			MessageDigest md5=MessageDigest.getInstance("md5");
			return new BigInteger(1,md5.digest(str.getBytes("utf-8"))).toString(16);
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		
		return null;
	
}

}
